package com.ourteam.system.service;

/**
 *
 * Template Name : 业务服务实现基类
 * Template Version : 1
 * Template Last Modfiy Date : Mon Nov 06 10:52:01 CST 2017
 * Auto Generate Date : 2018-07-20 12:04:38
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


abstract class AbstractSysDepartmentService extends net.service.DefaultServiceImpl
    implements ISysDepartmentService {
    protected static final Log logger = LogFactory.getLog(AbstractSysDepartmentService.class);

    /**
     * SysDepartment DAO Instance
    */
    protected com.ourteam.system.dao.ISysDepartmentDAO sysDepartmentDao;

    /**
     * SysUserDepartmentRelate DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserDepartmentRelateDAO sysUserDepartmentRelateDao;

    /**
     * SysUser DAO Instance
    */
    protected com.ourteam.system.dao.ISysUserDAO sysUserDao;

    /**
     *  SystemEventLogService Instance
    */
    protected com.ourteam.system.service.ISystemEventLogService systemEventLogService;

    /**
         *  Get SysDepartment DAO Instance
         */
    public com.ourteam.system.dao.ISysDepartmentDAO getSysDepartmentDao() {
        return sysDepartmentDao;
    }

    /**
         *  Set SysDepartment DAO Instance
         */
    public void setSysDepartmentDao(
        com.ourteam.system.dao.ISysDepartmentDAO aDao) {
        sysDepartmentDao = aDao;
    }

    /**
         *  Get SysUserDepartmentRelate DAO Instance
         */
    public com.ourteam.system.dao.ISysUserDepartmentRelateDAO getSysUserDepartmentRelateDao() {
        return sysUserDepartmentRelateDao;
    }

    /**
         *  Set SysUserDepartmentRelate DAO Instance
         */
    public void setSysUserDepartmentRelateDao(
        com.ourteam.system.dao.ISysUserDepartmentRelateDAO aDao) {
        sysUserDepartmentRelateDao = aDao;
    }

    /**
         *  Get SysUser DAO Instance
         */
    public com.ourteam.system.dao.ISysUserDAO getSysUserDao() {
        return sysUserDao;
    }

    /**
         *  Set SysUser DAO Instance
         */
    public void setSysUserDao(com.ourteam.system.dao.ISysUserDAO aDao) {
        sysUserDao = aDao;
    }

    /**
         *  Get SystemEventLogService Instance
        */
    public com.ourteam.system.service.ISystemEventLogService getSystemEventLogService() {
        return systemEventLogService;
    }

    /**
     *  Set SystemEventLogService Instance
    */
    public void setSystemEventLogService(
        com.ourteam.system.service.ISystemEventLogService aService) {
        systemEventLogService = aService;
    }

    /**
     *
    
     * @param aSystemDepartment
    
     * @throws Exception
     */
    protected abstract void doAddNewSystemDepartment(
        final com.ourteam.system.domain.SystemDepartmentBean aSystemDepartment)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void addNewSystemDepartment(
        final com.ourteam.system.domain.SystemDepartmentBean aSystemDepartment)
        throws Exception {
        try {
            if (aSystemDepartment == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [aSystemDepartment] Value is NULL");
            }

            doAddNewSystemDepartment(aSystemDepartment);
        } catch (Exception e) {
            logger.error("do addNewSystemDepartment error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aSystemDepartment
    
     * @throws Exception
     */
    protected abstract void doModifySystemDepartment(
        final com.ourteam.system.domain.SystemDepartmentBean aSystemDepartment)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void modifySystemDepartment(
        final com.ourteam.system.domain.SystemDepartmentBean aSystemDepartment)
        throws Exception {
        try {
            if (aSystemDepartment == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [aSystemDepartment] Value is NULL");
            }

            doModifySystemDepartment(aSystemDepartment);
        } catch (Exception e) {
            logger.error("do modifySystemDepartment error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aSystemDepartmentId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemDepartmentBean doGetSystemDepartmentById(
        final long aSystemDepartmentId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemDepartmentBean getSystemDepartmentById(
        final long aSystemDepartmentId) throws Exception {
        try {
            com.ourteam.system.domain.SystemDepartmentBean result = doGetSystemDepartmentById(aSystemDepartmentId);

            return result;
        } catch (Exception e) {
            logger.error("do getSystemDepartmentById error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aSystemDepartmentIds
    
     * @param operatorId
    
     * @throws Exception
     */
    protected abstract void doDeleteSystemDepartments(
        final long[] aSystemDepartmentIds, final long operatorId)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void deleteSystemDepartments(final long[] aSystemDepartmentIds,
        final long operatorId) throws Exception {
        try {
            doDeleteSystemDepartments(aSystemDepartmentIds, operatorId);
        } catch (Exception e) {
            logger.error("do deleteSystemDepartments error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param queryBean
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemDepartmentBean[] doQuerySystemDepartments(
        final com.ourteam.system.dao.SysDepartmentDAOQueryBean queryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemDepartmentBean[] querySystemDepartments(
        final com.ourteam.system.dao.SysDepartmentDAOQueryBean queryBean)
        throws Exception {
        try {
            com.ourteam.system.domain.SystemDepartmentBean[] result = doQuerySystemDepartments(queryBean);

            return result;
        } catch (Exception e) {
            logger.error("do querySystemDepartments error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param queryBean
    
     * @throws Exception
     */
    protected abstract int doQuerySystemDepartmentCount(
        final com.ourteam.system.dao.SysDepartmentDAOQueryBean queryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public int querySystemDepartmentCount(
        final com.ourteam.system.dao.SysDepartmentDAOQueryBean queryBean)
        throws Exception {
        try {
            int result = doQuerySystemDepartmentCount(queryBean);

            return result;
        } catch (Exception e) {
            logger.error("do querySystemDepartmentCount error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aSystemUserDepartment
    
     * @throws Exception
     */
    protected abstract void doSetSystemUserDepartment(
        final com.ourteam.system.domain.SystemUserDepartmentRelateBean aSystemUserDepartment)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void setSystemUserDepartment(
        final com.ourteam.system.domain.SystemUserDepartmentRelateBean aSystemUserDepartment)
        throws Exception {
        try {
            if (aSystemUserDepartment == null) {
                throw new org.apache.commons.lang.NullArgumentException(
                    "The Parameter [aSystemUserDepartment] Value is NULL");
            }

            doSetSystemUserDepartment(aSystemUserDepartment);
        } catch (Exception e) {
            logger.error("do setSystemUserDepartment error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aSystemUserDepartmentId
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUserDepartmentRelateBean doGetSystemUserDepartmentById(
        final long aSystemUserDepartmentId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUserDepartmentRelateBean getSystemUserDepartmentById(
        final long aSystemUserDepartmentId) throws Exception {
        try {
            com.ourteam.system.domain.SystemUserDepartmentRelateBean result = doGetSystemUserDepartmentById(aSystemUserDepartmentId);

            return result;
        } catch (Exception e) {
            logger.error("do getSystemUserDepartmentById error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param queryBean
    
     * @throws Exception
     */
    protected abstract com.ourteam.system.domain.SystemUserDepartmentRelateBean[] doQuerySystemUserDepartments(
        final com.ourteam.system.dao.SysUserDepartmentRelateDAOQueryBean queryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public com.ourteam.system.domain.SystemUserDepartmentRelateBean[] querySystemUserDepartments(
        final com.ourteam.system.dao.SysUserDepartmentRelateDAOQueryBean queryBean)
        throws Exception {
        try {
            com.ourteam.system.domain.SystemUserDepartmentRelateBean[] result = doQuerySystemUserDepartments(queryBean);

            return result;
        } catch (Exception e) {
            logger.error("do querySystemUserDepartments error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param queryBean
    
     * @throws Exception
     */
    protected abstract int doQuerySystemUserDepartmentCount(
        final com.ourteam.system.dao.SysUserDepartmentRelateDAOQueryBean queryBean)
        throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public int querySystemUserDepartmentCount(
        final com.ourteam.system.dao.SysUserDepartmentRelateDAOQueryBean queryBean)
        throws Exception {
        try {
            int result = doQuerySystemUserDepartmentCount(queryBean);

            return result;
        } catch (Exception e) {
            logger.error("do querySystemUserDepartmentCount error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aSystemUserDepartmentIds
    
     * @throws Exception
     */
    protected abstract void doDeleteSystemUserDepartments(
        final long[] aSystemUserDepartmentIds) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void deleteSystemUserDepartments(
        final long[] aSystemUserDepartmentIds) throws Exception {
        try {
            doDeleteSystemUserDepartments(aSystemUserDepartmentIds);
        } catch (Exception e) {
            logger.error("do deleteSystemUserDepartments error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aDepId
    
     * @param sortIndex
    
     * @param operatorId
    
     * @throws Exception
     */
    protected abstract void doSetSystemDepartmentSortIndex(final long aDepId,
        final int sortIndex, final long operatorId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public void setSystemDepartmentSortIndex(final long aDepId,
        final int sortIndex, final long operatorId) throws Exception {
        try {
            doSetSystemDepartmentSortIndex(aDepId, sortIndex, operatorId);
        } catch (Exception e) {
            logger.error("do setSystemDepartmentSortIndex error", e);
            throw e;
        }
    }

    /**
     *
    
     * @param aParentId
    
     * @throws Exception
     */
    protected abstract int doGetMaxSystemDepartmentSortIndex(
        final long aParentId) throws Exception;

    /**
     * $method.description
    
     * @throws Exception
     */
    public int getMaxSystemDepartmentSortIndex(final long aParentId)
        throws Exception {
        try {
            int result = doGetMaxSystemDepartmentSortIndex(aParentId);

            return result;
        } catch (Exception e) {
            logger.error("do getMaxSystemDepartmentSortIndex error", e);
            throw e;
        }
    }
}
